package br.com.ss.centralaamar.component;

import org.apache.commons.mail.EmailException;
import org.apache.commons.mail.SimpleEmail;

public class AgoraVai   {

	public static void main(String[] args) throws EmailException {
		enviar1();
	}

	public static void enviar1() throws EmailException {

		SimpleEmail email = new SimpleEmail();
		email.setHostName("smtp.gmail.com");
		email.addTo("claudemirramosferreira@gmail.com", "John Doe");
		email.setFrom("claudemirramosferreira@gmail.com", "Me");
		email.setSubject("Test message");
		email.setMsg("This is a simple test of commons-email");
		email.setSmtpPort(587);
		email.setAuthentication("claudemirramosferreira@gmail.com",
				"vedita1234");
		email.send();
		System.out.println("email enviado");
	}
}
